The Internet and the World Wide Web (hereinafter “the web”) have revolutionized the ways in which information is disseminated and shared. A wide variety of information can be simultaneously accessed by multiple users through a new category of documents designed to easily represent content for display and transmission over the Internet. These new documents, often referred to as electronic documents or web pages, are increasingly replacing their traditional paper counterparts as the medium through which business is carried out.
An electronic document is a multimedia composition that is displayed to the user on a “web browser window” by “web browser software”. Electronic documents may contain text, audio, graphics, imagery, and video content, as well as nearly any other type of content that may be experienced through use of a computer or other electronic devices. Additionally, electronic documents may be interactive, and may contain user selectable links that cause other electronic documents to be accessed.
Electronic documents are used in many creative and diverse fields, including entertainment, commerce, government, and education. In particular, the easy access to information in electronic documents has transformed education, enabling students and teachers to participate in a rich learning environment. Lectures, research materials, and other course components may be made available on demand, allowing students with a computer connected to the Internet to have access to educational material from any place at any time.
The Internet provides a very effective environment for the collaborative learning of various topics, especially when it involves the use of a computer, such as, for example, learning computer languages. Students can access a number of online tutorials on computer languages, learn about the languages' keywords and syntax, and immediately apply the concepts learned in the tutorials by writing and executing programs on the same computer where the tutorials are being displayed. The students can further share their programs with others for review, by including them in electronic documents accessible over the Internet. This process has considerably facilitated the learning of computer languages for many users, including the growing community of non-technically savvy users who desire to be proficient in creating computer applications.
Online computer language tutorials are essentially a set of electronic documents explaining the language syntax and providing examples on how the language is used to implement computer programs. The examples are usually a set of instructions or exercises for the user to perform. Some online tutorials may provide an interactive window in the electronic document, such as an editing window, for the user to type in the example instructions. This activity takes place in the user's computer, with the web browser software displaying the example instructions and the interactive window. The user may select a “submit” button associated with the interactive window for execution of the example instructions. Once the submit button is selected, the web browser software establishes a connection over the Internet between the user's computer and a “web server”, which is responsible for the execution of the instructions typed in the interactive window displayed in the user's computer. The example instructions are then processed by the web server, and the results are sent back to the user's computer over the Internet. The results of the example instructions are displayed in another electronic document in the user's computer once the web browser software handles the web server's response.
This type of online tutorial has several significant drawbacks. First, depending on the Internet connection the user has, it may take several minutes for the user to type the example instructions in the interactive window of the electronic document, send the example instructions for processing at the web server, and get the results back. Under heavy Internet congestion, it may take several processing requests before the web server responds with the example results. This problem is accentuated if the example itself requires user interaction.
Second, this type of online tutorial does not enable the user to easily and quickly modify the example instructions to see how they could be adapted to a particular situation. Modifying the example instructions would require the user to perform several steps, including: (1) executing the original example instructions; (2) sending the appropriate requests to the server; (3) analyzing the example results; (4) generating the modified set of instructions; (5) sending the new requests to the server for executing the modified instructions; and (6) analyzing the new example results and comparing them to the original example results. This process may be repeated multiple times, and in certain circumstances, it may be hard for the user to keep track of which changes in the example instructions produced which set of results. This usually occurs when the results are displayed in several “pop-up windows” that may be accidentally closed by the user, or when the results are displayed in the same web browser window used by the tutorial to display the original instructions, which would require the user to select the “back” button on the web browser repeatedly to view the original instructions. The latter approach is the one adopted by an online tutorial on the SQL database language.
Finally, if the user makes an error when typing the example instructions, the server typically responds with an error message that simply says an error occurred without giving the user further indications of why the typed example instructions could not be executed properly. Users may get frustrated with the lack of guidance provided by such examples.
In view of the drawbacks above, it would be desirable to provide methods and apparatus for generating coding examples in online tutorials for computer languages that overcome these drawbacks.
It would further be desirable to provide methods and apparatus for generating coding examples in electronic documents that can be processed in the user's computer.
It would still further be desirable to provide methods and apparatus for generating interactive coding examples in electronic documents that enable the user to easily view, modify, and execute the example instructions.
It would also be desirable to provide methods and apparatus for generating coding examples that provide suitable error messages when the user makes a mistake when writing the example source code.